package com.service.pay.diamond.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tool.base.base.BaseEntity;
import lombok.Data;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToOne;
import java.util.Date;

@Entity(name = "dm_unifiedorder")
@Data
public class UnifiedOrderEntity extends BaseEntity {
    @OneToOne(cascade = CascadeType.MERGE)
    private OrderEntity order;
    private String orderNo;
    private String body;
    private String attach;
    private int fee;
    private String ip;
    private String redirectUrl;
    private String notifyUrl;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date timeStart;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date timeEnd;
    private String prepayId;
}
